import Search from '@/components/Search';
import React, { useState } from 'react';
import Tabs from './components/Tabs';
import styles from './index.less';

const index: React.FC = () => {
  // eslint-disable-next-line react-hooks/rules-of-hooks
  const [searchInfo, setSearchInfo] = useState<string>('');
  const handleSearchValue = (value: string) => {
    setSearchInfo(value);
  };
  return (
    <div className={styles.container}>
      <div className="search">
        <Search placeholder="请输入溯源码" onSearchValue={handleSearchValue} />
      </div>
      <div className={styles.tabs}>
        <Tabs searchInfo={searchInfo} />
      </div>
    </div>
  );
};

export default index;
